const Data = module.exports;
Data.zsetToObject= async function (data) {
    let list = []
    let obj ={};
    for (let i=0;i<data.length;i++) {
        if(!(i%2)){
            obj={
                value:data[i],
                score:data[i+1]
            }
            list.push(obj);
        }
    }
    return list;
}

Data.replaceAll = function (find, replace, str) {
    var find = find.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
    return str.replace(new RegExp(find, 'g'), replace);
  }

require('./tags')(Data);
require('./meta')(Data);
require('./topicsElasticsearch')(Data);
require('./user')(Data);
require('./topic')(Data);
require('./region')(Data);
require('./reindex')(Data);
require('./page')(Data);

 